//
//  ShowCell3.swift
//  AgricultureApp
//
//  Created by eport_user1 on 2018/1/15.
//  Copyright © 2018年 eport_user1. All rights reserved.
//

import UIKit

class ShowCell3: UITableViewCell {

    
    @IBOutlet weak var titleLabel: UILabel!
    
    @IBOutlet weak var timeLabel: UILabel!
    
    @IBOutlet weak var imageview1: UIImageView!
    
    @IBOutlet weak var imageview2: UIImageView!
    
    @IBOutlet weak var imageView3: UIImageView!
    
    var model:HomeModel?
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        titleLabel.font = UIFont.systemFont(ofSize: 17)
        titleLabel.textColor = UIColor.black
    
        
        timeLabel.font = UIFont.systemFont(ofSize: 15)
        timeLabel.textColor = UIColor.gray
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        titleLabel.text = model?.title
        let string1 = model?.publish_time
        let string2 = model?.factModel?.full_name
        
        let strings = (string1)! + (string2)!
        timeLabel.text = string2
        
        let url1 = URL.init(string: (model?.content_thumbs![0] as? String)!)
        let url2 = URL.init(string: (model?.content_thumbs![1] as? String)!)
        let url3 = URL.init(string: (model?.content_thumbs![2] as? String)!)
        
        imageview1.kf.setImage(with: url1)
        imageview2.kf.setImage(with: url2)
        imageView3.kf.setImage(with: url3)
        
    }
    
}
